home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 007 / cstdio.arc / SRC.ARC / STRCAT.C < prev    next >
C/C++ Source or Header  |  1984-07-29  |  308b  |  15 lines

  1. /*    strcat.c - concatenate 2 character strings.
  2.     K & R page 44, using pointers.
  3.     G. R. Mansfield.  84/06/06.
  4.     Ver 1.0-4729.
  5. */
  6.  
  7. int strcat(s, t)    /* concatenate t to end of s; s must be large enough */
  8. char *s, *t;
  9. {
  10.     while (*s)    /* find end of t */
  11.         s++;
  12.     while (*s++ = *t++)    /* copy t */
  13.         ;
  14. }
  15.